package com.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import com.google.gson.Gson;
import com.pojo.equip_light;
import com.pojo.equip_shadow;
import com.pojo.heroData;
import com.pojo.heroOccupation;
import com.pojo.heroRace;
import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Occurs;
import com.util.MyUtil;

public class funcTest {

	public List<heroData> findAllHero(heroData herodata) {
		SqlSession session = MyUtil.getSession();

		List<heroData> herolist = session.selectList(
				"com.mapper.heroMapper.findAllHero", herodata);

		return herolist;
	}

	
	public List<heroRace> findRace() {
		SqlSession session = MyUtil.getSession();
		List<heroRace> herolist = session
				.selectList("com.mapper.heroMapper.findRace");
//		for (heroRace list : herolist) {
//			System.out.println(list);
//		}
		return herolist;
	}
	
	@Test
	public List<heroOccupation> findOcc(){
		SqlSession session = MyUtil.getSession();
		List<heroOccupation> occupationslist = session.
				selectList("com.mapper.heroMapper.findOcc");
//		for (heroOccupation heroOccupation : occupationslist) {
//			System.out.println(heroOccupation);
//		}
		return occupationslist;
	}

	public List<equip_light> findEquip_light(){
		SqlSession session = MyUtil.getSession();
		List<equip_light> equip_lightlist = session.selectList("com.mapper.heroMapper.findEquip_light");
		return equip_lightlist;
	}
	
	public List<equip_shadow> findEquip_shadow(){
		SqlSession session = MyUtil.getSession();
		List<equip_shadow> equip_shadowlist = session.selectList("com.mapper.heroMapper.findEquip_shadow");
		return equip_shadowlist;
	}
}
